<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>代理提现申请</title>
        <link href="/zhenze/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/zhenze/Public/admin/js/jquery.js"></script>
        <script type="text/javascript" src="/zhenze/Public/My97DatePicker/WdatePicker.js"></script>

		<link href="/zhenze/Public/admin/css/select.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="/zhenze/Public/admin/js/jquery.idTabs.min.js"></script>
		<script type="text/javascript" src="/zhenze/Public/admin/js/select-ui.min.js"></script>

		<script type="text/javascript">
		$(document).ready(function(e) {
			$("#statusinfo").uedSelect({
				width : 150			  
			});
		});
		</script>
    </head>

    <body>

        <div class="place">
            <span>位置：</span>
            <ul class="placeul">
                <li><a href="<?php echo U('index/welcome');?>">首页</a></li>
                <li><a href="###">代理提现申请</a></li>
            </ul>
        </div>

        <div class="formbody"> 
            <form name="seachform" id="seachform" action="<?php echo U('agency/agentapply');?>" method="post">
                <ul class="seachform">
                    <li><label>代理名</label><input name="info[keyword]" value="<?php echo ($keyword); ?>" type="text" class="scinput" /></li>		 
					<li><label>状态</label>
						<div class="vocation">
							<select id="statusinfo" name="info[status]">
								<option value="">-请选择状态-</option> 
								<?php if(is_array($statusinfo)): $i = 0; $__LIST__ = $statusinfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($i % 2 );++$i;?><option value="<?php echo ($key); ?>" <?php if($status == $key ): ?>selected<?php endif; ?>/><?php echo ($value); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
							</select> 
						</div>
					</li>
                    <li><label>申请时间搜索</label><input placeholder="起始时间" name="info[start_time]" id="starttime" class="scinput" type="text" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd'})" datatype="*" errormsg="时间范围开始值不能为空！" maxlength="20" style="width: 170px;" readonly value="<?php echo ($start_time); ?>" /></li>
                    <li><label></label><input placeholder="截止时间" name="info[end_time]" id="endtime" class="scinput" type="text" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd'})" datatype="*" errormsg="时间范围结束值范围不能为空！" maxlength="20" style="width: 170px;" readonly value="<?php echo ($end_time); ?>" /></li>
                    <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
                </ul>
            </form>

            <table class="tablelist">
                <thead>
                    <tr>  
                        <th>代理名</th>
                        <th>金额</th> 
						<th>真实姓名</th>
						<th>银行</th>
						<th>银行卡号</th>
                        <th>申请时间</th>
                        <th>状态</th>
						<th>备注说明</th>
                        <th>取款时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <?php if(is_array($dataList)): $i = 0; $__LIST__ = $dataList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($i % 2 );++$i;?><tr> 
                            <td><?= $value['username']?></td>
                            <td><?= $value['amount']?></td>  
							<td><?= $value['realname']?></td> 
							<td><?= $value['bankname']?></td> 
							<td><?= $value['bankcode']?></td> 
                            <td><?= date('Y-m-d H:i:s',$value['apply_time'])?></td> 
                            <td><?php echo ($statusinfo[$value['status']]); ?></td> 
							<td><?= $value['remarks']?></td> 
                            <td>
                                <?php if($value['status'] == 2):?> 
                                <?= date('Y-m-d H:i:s',$value['withdraw_time'])?>
                                <?php else:?>
                                ---
                                <?php endif;?> 
                            </td> 
                            <td>
                                <?php if($value['status'] == 1):?> 
                                <a href="<?php echo U('agency/agentapplyok',array('admin_id'=>$value['admin_id'],'id'=>$value['id'],'amount'=>$value['amount']));?>" onclick="{if(confirm('确认取款?')){return true;}return false;}" class="tablelink">取款</a> 
                                <?php else:?>
                                ---
                                <?php endif;?> 
                            </td>
                        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                </tbody>
            </table>

            <?php echo ($pageshow); ?>

        </div> 
        <script type="text/javascript">
            $('.tablelist tbody tr:odd').addClass('odd');
        </script>
    </body>

</html>